# 
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=sshguard
PKG_VERSION:=1.5rc5
PKG_RELEASE:=rc4

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_RELEASE).tar.bz2
PKG_SOURCE_URL:=http://ufpr.dl.sourceforge.net/sourceforge/sshguard/$(PKG_SOURCE)
#PKG_MD5SUM:=ff57d62bb8891fe06748bc7c3968ff37 

include $(INCLUDE_DIR)/package.mk

define Package/sshguard
  SECTION:=Testing
  CATEGORY:=Testing
  SUBMENU:=Monitor
  DEPENDS:=
  TITLE:=Monitors logging activity 
  URL:=http://sshguard.sourceforge.net/
endef

define Package/sshguard/description
	Sshguard monitors servers from their logging activity. It reacts to messages 
	about dangerous activity by blocking the source address with the local 
	firewall.
endef

define Package/sshguard/conffiles
endef

# uses GNU configure

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) \
		DESTDIR="$(PKG_INSTALL_DIR)" \
#		all install
endef

define Package/sshguard/install
#	$(INSTALL_DIR) $(1)/etc/init.d
#	$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/chilli
#	$(INSTALL_DIR) $(1)/etc
#	$(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/chilli.conf $(1)/etc/
#	$(INSTALL_DIR) $(1)/usr/sbin
#	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,sshguard))
